Release 10.1A: OpenEdge Data Management:
DataServer for Microsoft SQL Server
ROWID function
The
ROWIDdata type provides a unique record identifier that is compatible across OpenEdge and MS SQL Server databases. Applications that use theROWIDfunction behave in the same way whether they access records in an OpenEdge databases or in an MSS data source. TheROWIDfunction is more consistent thanRECIDacross data sources, sinceRECIDcannot guarantee uniqueness. Progress Software Corporation recommends that you replace theRECIDfunction withROWIDin existing applications.The DataServer supports the
ROWIDfunction for MSS data source tables that have a unique index. The DataServer utilities use an index that meets this criterion to provide values for theROWIDfunction. If you build your schema holder using the Progress-to-MSS utility and you select to create theRECIDfield, it is automatically designated as theROWIDindex. However, if you do not create theRECIDfield, you can select a unique index to supportROWID. See the "Defining the ROWID" section for instructions.The
ROWIDvalue in an MSS data source differs from theROWIDvalue in an OpenEdge database if you use the unique index method in the following ways:
- In an OpenEdge database, you can create a
ROWIDwithout creating a record. In DataServer applications, creating aROWIDcreates a record. The following statement illustrates the difference in behavior:
The DataServer creates a
customerrecord using default values.- The
ROWIDchanges if the value of the unique keys in the designated index changes.- The DataServer considers a single instance of the Unknown value (
?) to be unique, so it is possible to have aROWIDwith the Unknown value (?). However, the ProgressROWIDfunction fails if you search for an Unknown value (?), because an OpenEdgeROWIDwill never have the Unknown value (?). For example, the followingFINDstatement fails even if there is a row with the Unknown value (?) in the designated column:
- If you force the creation of a record before entering the value for the designated column (for example, by committing a transaction or releasing or validating a record), the creation fails if the column cannot have
NULLvalues. If the column can haveNULLvalues, the DataServer assigns the new record aROWIDofNULL. However, if the column has an initial value, the DataServer creates the row with that initial value as theROWID.Follow these guidelines when using
ROWIDin applications that you want to deploy across multiple OpenEdge databases and/or MSS data sources:Refresh the
ROWIDvalue after you undo aDELETE. TheROWIDvalue might be different after the record is recreated.For a complete description of the
ROWIDfunction, see its reference entry in OpenEdge Development: Progress 4GL Reference .
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |